package com.kc.sys.common;


import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

/**
 * @author forever_love
 * @create 2020--01--02 17:08
 **/
    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public class TreeNodeStand extends TreeNode {
        private Integer id;
        @JsonProperty("parentId")
        private Integer pid;
        private String title;
        private String icon;
        private String href;
        private  Boolean spread;
        private String standId;
        private List<com.kc.sys.common.TreeNode> children = new ArrayList<>();

        private String checkArr = "0";//0代表不选中  1代表选中

        /**
         * 首页左边导航树的构造器
         */
        public TreeNodeStand(Integer id, Integer pid, String title, String icon, String href, Boolean spread) {
            super();
            this.id = id;
            this.pid = pid;
            this.title = title;
            this.icon = icon;
            this.href = href;
            this.spread = spread;
        }

        /**
         * dtree的数据格式
         * @param id
         * @param pid
         * @param title
         * @param spread
         * @param
         */
        public TreeNodeStand(Integer id, Integer pid, String title, Boolean spread, String standId) {
            super();
            this.id = id;
            this.pid = pid;
            this.title = title;
            this.standId = standId;
            this.spread = spread;
        }

        /**
         * dTree复选树的构造器
         * @param id
         * @param pid
         * @param title
         * @param spread
         * @param checkArr
         */
        public TreeNodeStand(Integer id, Integer pid, String title, Boolean spread, String standId,String checkArr) {
            super();
            this.id = id;
            this.pid = pid;
            this.title = title;
            this.spread = spread;
            this.standId = standId;
            this.checkArr = checkArr;
        }
}
